﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntranceApp
{
    class Order
    {
        //fields
        private string order_id;
        private double totalPrice;
        private DateTime order_date;
        private string account_id; //who is paying
        private OrderLine orderline;
        private List<OrderLine> orderLineList;//for what he is paying

        //properties
        public string Order_id { get { return order_id; } set { order_id = value; } }
        public double TotalPrice { get { return totalPrice; } set { totalPrice = value; } }
        public DateTime Order_date { get { return order_date; } set { order_date = value; } }
        public string Acoount_id { get { return account_id; } set { account_id = value; } }
        public List<OrderLine> OrderLineList { get { return orderLineList; } set { orderLineList = value; } }
        public OrderLine Orderline { get { return orderline; } set { orderline = value; } }

        
        //constructor

        public Order(string order_id,double totalPrice,DateTime order_date,string account_id)
        {
            this.order_id = order_id;
            this.totalPrice = totalPrice;
            this.order_date = order_date;
            this.account_id = account_id;

        }
        //constructor for order
        public Order()
        {
            this.orderLineList = new List<OrderLine>();
        }
        
        //Methods

        public double GetTotalPrice()
        {
            return totalPrice;
        }
        public List<OrderLine> GetAllOrderLines()
        {
            return orderLineList;
        }

        //To do ToString();
    }
}
